<?php

$root = '/var/www/Labs/chilikcms/libs/quickprof/sizer/';

include $root.'interface/fs.php';
include $root.'sizer.php';

$files = get_included_files();


$sizer = new Entity\Sizer;
$path = '/var/www/Labs/';
$dir = scandir("/var/www/Labs/");

$match = preg_grep('/(\.php)/xm', $dir);

echo "<pre>";

echo "\nMethod: ", '$sizer->info($size);',"\n\n";

foreach($match as $val)
{
    $size = filesize($path.$val);
    echo $val," : ", $sizer->info($size), "\n";
}

echo "\n\nMethod: ", '$sizer->info($size, \'%01.0f %s\');',"\n\n";
foreach($match as $val)
{
    $size = filesize($path.$val);
    echo $val," : ", $sizer->info($size, '%01.0f %s'), "\n";
}

/*
 *  invoke method
 */

echo "\n\nMethod: ", '$sizer($size);',"\n\n";
foreach($match as $val)
{
    $size = filesize($path.$val);
    echo $val," : ", $sizer($size), "\n";
}

echo "\n\nMethod: ", '$sizer($size, \'%01.0f %s\');',"\n\n";
foreach($match as $val)
{
    $size = filesize($path.$val);
    echo $val," : ", $sizer($size, '%01.0f %s'), "\n";
}

foreach($files as $val)
{
    $size = filesize($val);
    echo $val," : ", $sizer->info($size), "\n";
}

echo "</pre>";

